package com.jianying.mapper;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.stereotype.Repository;

import com.jianying.base.BaseMapper;
import com.jianying.domain.TenantConnection;


@Repository("tenantConnectionMapper")
public class TenantConnectionMapper extends BaseMapper {
	
	private static final String NAME_SPACE = "com.jianying.mapper.TenantConnectionMapper.";
	
	public List<TenantConnection> all(){
		return getSqlSessionTemplate().selectList(NAME_SPACE + "all");
	}
	
	public TenantConnection find(Integer id, Integer tenantId){
		Map<String, Object> map = new HashMap<>();
		map.put("id", id);
		map.put("tenantId", tenantId);
		return getSqlSessionTemplate().selectOne(NAME_SPACE + "find", map);
	}


}
